package cn.shcool.entity;

import java.io.Serializable;

//对应表s_subject
//实现seriable接口
public class Subject implements Serializable {
	private long id;
	private String subjectname;// 课程名称
	private long gradeid;// 年级号
	private int classHour;// 学时
	// 三个构造方法：1 无参,2:除了自增长列的所有列，3：所有列

	public Subject() {

	}

	public Subject(String subjectname, long gradeid, int classHour) {
		super();
		this.subjectname = subjectname;
		this.gradeid = gradeid;
		this.classHour = classHour;
	}

	public Subject(long id, String subjectname, long gradeid, int classHour) {
		super();
		this.id = id;
		this.subjectname = subjectname;
		this.gradeid = gradeid;
		this.classHour = classHour;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getSubjectname() {
		return subjectname;
	}

	public void setSubjectname(String subjectname) {
		this.subjectname = subjectname;
	}

	public long getGradeid() {
		return gradeid;
	}

	public void setGradeid(long gradeid) {
		this.gradeid = gradeid;
	}

	public int getClassHour() {
		return classHour;
	}

	public void setClassHour(int classHour) {
		this.classHour = classHour;
	}

	@Override
	public String toString() {
		return "Subject [id=" + id + ", subjectname=" + subjectname + ", gradeid=" + gradeid + ", classHour="
				+ classHour + "]";
	}

}
